package br.com.wryel.controller;

import java.util.Arrays;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.servlet.ModelAndView;

import br.com.wryel.model.ModelException;

@Scope(WebApplicationContext.SCOPE_APPLICATION)
@Controller
public class ApplicationController extends BasicController {
	
	@RequestMapping(value = "/index", method = RequestMethod.GET)
	public ModelAndView index() throws ModelException {
		ModelAndView modelAndView = new ModelAndView("home");
		modelAndView.addObject("mensagens", Arrays.asList("aaaaa", "bbbbbb", "xxxxx"));
		return modelAndView;
	}
}
